<template>
	<view class="con">
		<view class="result">
			<image src="../../static/xz.png" mode="widthFix"></image>
			<view class="info">设置管理线成功</view>
		</view>
		
		<view class="content">请保证管理线路已连接网络,并保持在线状态。</view>
		
		<view class="button" @tap="tocallnum">
			开始拨号
		</view>
	</view>
</template>

<script>

	export default {
		data() {
			return {
				nodeID:""
			}
		},
		onLoad(option) {
			this.nodeID = option.nodeID
		},
		
		methods: {
			tocallnum(){
				uni.navigateTo({
					url:'/pages/index/numbers?nodeID='+this.nodeID
				})
			},

			config(){
				let _this = this
				
				uni.showModal({
					
					title:'开始拨号',
					content:'请仔细核对拨号信息，确认开始拨号吗？',
					success:function(res){
						if(res.confirm){
							uni.showLoading({
								title:'拨号中'
							})
							_this.$api.interfaceApi('bgipushnum')({
								//sys:App.globalData.sys,
								nodeId:_this.nodeID,
								//data: JSON.stringify(adddata)
							}).then(result=>{
								uni.hideLoading();
								uni.navigateTo({
									url:'/pages/index/numbers?nodeID='+_this.nodeID
								})
								// if(result.code == 200){
								// 	console.log("成功进入")
								// 	uni.navigateTo({
								// 		url:'/pages/index/numbers-line?nodeID='+_this.nodeID
								// 	})
								// }else{
								// 	uni.showToast({
								// 		title:result.desc,
								// 		icon:'none'
								// 	})
								// }
							})	
						}else if(res.cancel){
							
						}
					}
				})
				
				// uni.navigateTo({
				// 	url:'/pages/index/numbers?nodeID='+this.nodeID
				// })
			}
		}
	}
</script>

<style lang="scss">
	.con{
		padding: 10rpx 40rpx;
		
		.result{
			display: flex;
			
			image {
				margin: 30% 0 0 20%;
				width: 100rpx;
				height: 100rpx;
			}
			
			.info{
				margin: 30% 0 0 25%;
				height: 100rpx;
				line-height: 100rpx;
				margin-left: 40rpx;
				font-size: 40rpx;
			}
		}
		
		.content{
			letter-spacing: 5rpx;
			text-align: center;
			margin-top: 30rpx;
		}
		
		.button{
			margin-top: 60rpx;
			border: 2rpx solid #d1d1d1;
			border-radius: 10rpx;
			padding: 10rpx;
			text-align: center;
			font-size: 30rpx;
			color: #6f6b6b;
		}
		
	}
</style>
